package service.impl;

import bean.Grade;
import bean.Student;
import dao.StudentDao;
import dao.impl.StudentDaoimpl;
import service.StudentService;
import utils.DruidUtils;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class StudentServiceimpl extends DruidUtils implements StudentService {
StudentDaoimpl studentDaoimpl = new StudentDaoimpl();


    @Override
    public List<Student> getstulist(String stuname,String stuno,int sex,int index,int lines)
    {
        return studentDaoimpl.getstulist(stuname,stuno,sex,index,lines);
    }

    @Override
    public int gettotal(String stuname, String stuno, int i) {
        return studentDaoimpl.gettotal(stuname,stuno,i);
    }

    @Override
    public int addstu(String stuname,String stuno,String address,String email,String phone,String idnumber,
                      String politics,String registered,String profession,String introduction,int gid,int sex) {
        return  studentDaoimpl.addstu(stuname,stuno,address,email,phone,idnumber,politics,registered,profession,introduction,gid,sex);

    }

    @Override
    public Student getStudentById(int stuid) {
        return studentDaoimpl.getStudentById(stuid);
    }

    @Override
    public int updateStudent(int stuid, String stuname, String stuno, String address, String email, String phone, String idnumber, String politics, String registered, String profession, String introduction, int gid, int sex) {
        return studentDaoimpl.updateStudent(stuid,stuname,stuno,address,email,phone,idnumber,politics,registered,profession,introduction,gid,sex);
    }

    @Override
    public int deletestudent(int stuid) {
        return studentDaoimpl.deletestudent(stuid);
    }


}
